import puppeteer from "../../../lib/puppeteer/puppeteer.js";
import { PLUGIN_PATH } from "../function/function.js";

export class Sm extends plugin {
    constructor() {
        super({
            name: '[Sm]帮助',
            dsc: '帮助',
            event: 'message',
            priority: 1,
            rule: [
                { reg: /^[#\/]?(奴隶|nl|群友)(帮助|菜单)/i, fnc: 'help' }
            ]
        })
    }

    async help(e) {
        const image = await puppeteer.screenshot('奴隶帮助', {
            tplFile: 'plugins/Slave-Market/resources/html/help/index.html',
            filePath: `${PLUGIN_PATH}/resources/`,
        })

        return e.reply([image])
    }
}